<?php TPL::output('admin/admin_header.tpl.htm'); ?>
<body >
<div id="body-wrapper">
<div id="main-content">
	<div class="clear"></div>
	<div class="content-box">
		<div class="content-box-header">
			<h3><?php echo $this->crumb['last']['name']; ?></h3>
			<ul class="content-box-tabs">
				<li><a class="default-tab current" href="#tab1">会员组</a></li>
				<li><a class="" href="#tab2">系统组</a></li>
			</ul>
			<div class="clear"></div>
		</div>
		<div class="content-box-content">
			<div id="notification_box" class="notification success png_bg" style="display:none;"> <a class="close" href="javascript:;"></a>
				<div name="notification_content"></div>
			</div>
			<div class="tab-content default-tab" id="tab1">
				<form method="post" action="admin/user/group_save_ajax/" id="mem_groups">
					<fieldset>
					<table>
						<thead>
							<tr>
								<th style="width:25px;"><input class="check-all" type="checkbox" /></th>
								<th style="width:25px;">ID</th>
								<th style="width:140px;">会员组名称</th>
								<th style="width:150px;">威望介于</th>
								<th style="width:80px;">威望系数</th>
								<th style="width:500px;"></th>
							</tr>
						</thead>
						<tbody>
							<?php foreach ($this->mem_group AS $key => $val) { ?>
							<tr>
								<td><input type="checkbox" value="<?php echo $val['group_id'];?>" name="group_ids[]"></td>
								<td><?php echo $val['group_id']; ?></td>
								<td><input type="text" size="16" name="group[<?php echo $val['group_id'];?>][group_name]" class="text-input" value="<?php echo $val['group_name'];?>" style="width:100px;"/></td>
								<td><input type="text" size="6" name="group[<?php echo $val['group_id'];?>][reputation_lower]" class="text-input small-input" value="<?php echo $val['reputation_lower'];?>"/>
									~
									<input type="text" size="6" name="group[<?php echo $val['group_id'];?>][reputation_higer]" class="text-input small-input" value="<?php echo $val['reputation_higer'];?>"/></td>
								<td><input type="text" size="6" name="group[<?php echo $val['group_id'];?>][reputation_factor]" class="text-input small-input" value="<?php echo $val[reputation_factor];?>"/></td>
								<td><a href="admin/user/group_edit/group_id-<?php echo $val['group_id']; ?>">权限编辑</a></td>
							</tr>
							<?php } ?>
							<tr>
								<td colspan="2">&nbsp;</td>
								<td colspan="4"><div><a class="addtr" onclick="addrow($(this))" href="javascript:;">+添加新用户组</a><span style="display:none;color:#57A000">&nbsp;(用户组添加后默认为最低权限，请添加后编辑用户组权限)</span></div></td>
							</tr>
						</tbody>
						<tfoot>
							<tr>
								<td colspan="6">
<input class="check-all" type="checkbox" />删?
					&nbsp;&nbsp;&nbsp;&nbsp; 
								<input class="button" type="button" onClick="ajax_post($('#mem_groups'), _form_process);" value="  提交  " />
</td>
							</tr>
						</tfoot>
					</table>
					<p> </p>
					</fieldset>
				</form>
			</div>
			<div id="tab2" style="display:none;">
				<form method="post" action="admin/user/group_save_ajax/" id="system_groups">
					<fieldset>
					<table>
						<thead>
							<tr>
								<th style="width:25px;">ID</th>
								<th style="width:140px;">系统组名称</th>
								<th></th>
							</tr>
						</thead>
						<tbody>
							<?php foreach ($this->system_group AS $key => $val) { ?>
							<tr>
								<td><?php echo $val['group_id']; ?></td>
								<td><?php echo $val['group_name'];?></td>
								<td><a href="admin/user/group_edit/group_id-<?php echo $val['group_id']; ?>">权限编辑</a></td>
							</tr>
							<?php } ?>
						</tbody>
						<tfoot>
						</tfoot>
					</table>
					</fieldset>
				</form>
			</div>
		</div>
		<div class="clear"></div>
		<div id="notf_tip" style="display:none;" class="notification png_bg"> <a href="javascript:;" class="close"><img src="<?php echo G_STATIC_URL;?>/admin/images/icons/cross_grey_small.png" alt="关闭" /></a>
			<div id="notf_cont"></div>
		</div>
	</div>
</div>
<script type="text/javascript" src="<?php echo G_STATIC_URL; ?>/admin/js/group.js"></script>
<?php TPL::output('admin/admin_footer.tpl.htm'); ?>
